package cn.patpang.core.framework.hibernate;

import java.io.Serializable;

/**
 * @Title BaseDaoView.java
 * @Author PangPX
 * @Data 2017年6月8日 下午2:50:56
 */
public class BDSort implements Serializable {

	public static enum K {
		ASC, DESC
	}

	private static final long serialVersionUID = -2841130093717212481L;

	private K sortKeyword;
	private String sortColumn;

	private BDSort(String sortColumn, K sortKeyword) {
		this.sortKeyword = sortKeyword;
		this.sortColumn = sortColumn;
	}

	public static BDSort set(String sortColumn) {
		return new BDSort(sortColumn, K.ASC);
	}

	public static BDSort set(K sortKeyword, String sortColumn) {
		return new BDSort(sortColumn, sortKeyword);
	}

	public String getSortColumn() {
		return sortColumn;
	}

	public K getSortKeyword() {
		return sortKeyword;
	}

}